package com.ktjiaoyu.crm.service;

import com.ktjiaoyu.crm.entity.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @Author：南小楠
 */
public interface IRoleService {
    public List<Role> findAllRoles();

    //增删改查
    public Role saveRole(Role role); //新增或修改

    public void deleteRoleById(Long roleId); //删除

    public void deleteRole(Role role);

    public Role getRole(Long roleId);//按主键查询单条

    public Page<Role> findRole(String roleName, Pageable pageable);//按名称模糊查询并分页

    //系统未提供权限操作的模块，权限业务和角色相关，所以统一设计在RoleService中
    public <Right> List<Right> findRightsByRole(Role role); //根据角色查询权限

    public <Right> List<Right> findAllRights();//查询所有权限
}

